<?php
    require_once ("../accesobd.php");
    
    $nfactura = $_POST["numero"];
    $busqueda = "SELECT  DISTINCT cli.cic,
                cli.nombrec, 
                cli.apec, 
                cli.fnacimientoc,
                cli.dirc, 
                tlf.tlfc, 
                mail.emailc, 
                cli.trabajo, 
                cli.ingreso, 
                cli.factu,
                veh.modelo, 
                fact.femision, 
                fact.tipopago
        FROM 	cliente as cli, 
                tlfcliente as tlf, 
                emailcliente as mail, 
                vehiculo as veh, 
                factura as fact
        WHERE 	cli.cic = tlf.cic AND 	cli.cic = mail.cic AND 	cli.cic = fact.cic AND	fact.idveh = veh.idveh";
    $query = pg_query($conex,$busqueda);
    
    
     if(!$query){
            echo 'Error. Cliente no existe';
     }
     
